<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>会员中心 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="Meida Team" />
<meta name="Copyright" content="Meida" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<% include("/WEB-INF/views/common/include.html"){}%>
<link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/member_center.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/register.js"></script>
</head>
<body class="memberCenter">
	<%include("/WEB-INF/views/shop/header_customer.html"){}%>
	<!--:include("/shop/header.html"){}% -->
	<div class="body memberCenterIndex">
		<div class="bodyLeft">
			<div class="memberInfo">
				<div class="top"></div>
				<div class="middle">
					<p>欢迎您！<span class="username">${loginMember.username!}</span> [<a class="userLogout" href="${base}/customerCenter/logout">退出</a>]</p>
					<p>会员等级:<span class="red"> ${loginMember.memberRank.name!}</span></p>
				</div>
				<div class="bottom"></div>
			</div>
			<div class="blank"></div>
			<!-- 侧边栏 -->
			<%include("/WEB-INF/views/shop/sidebar_customer.html"){}%>
		</div>
		<div class="bodyRight">
			<div class="memberCenterDetail">
				<div class="top">
					会员中心首页
				</div>
				<div class="middle">
					<div class="blank"></div>
					<table class="listTable">
						<tr>
							<td colspan="4">
								您目前是[${loginMember.memberRank.name!}]
								<%if (loginMember.memberRank.preferentialScale! != 100){%>
									<span class="red">[优惠百分比：${loginMember.memberRank.preferentialScale!}%]</span>
								<%}%>
							</td>
						</tr>
						<tr>
							<th>帐户总积分</th>
							<td>${loginMember.userBalance.point!0}</td>
							<th>订单总数量</th>
							<td>
								${loginMember.orderList.~size!}&nbsp;&nbsp;
								<a href="${base}/shop/order/list">[查看订单列表]</a>
							</td>
						</tr>
						<tr>
							<th>预存款余额</th>
							<td>${loginMember.userBalance.balance!,orderUnitCurrencyFormat}</td>
							<th>未读消息数</th>
							<td>
								${unreadMessageCount!}&nbsp;&nbsp;
								<a href="${base}/shop/message/inbox">[查看收件箱]</a>
							</td>
						</tr>
						<tr>
							<th>注册日期</th>
							<td>${loginMember.createDate!,dateFormat="yyyy-MM-dd HH:mm:ss"}</td>
							<th>最后登录IP</th>
							<td>${loginMember.loginIp!}</td>
						</tr>
					</table>
					<div class="blank"></div>
					<table class="listTable">
						<tr>
							<th style="width: 300px;">商品名称</th>
							<th>订单编号</th>
							<th>下单时间</th>
							<th>订单金额</th>
							<th>订单状态</th>
						</tr>
						<%for(list in loginMember.orderList!){%>
							<tr>
								<td>
									<a href="${base}/shop/order/view?id=${list.id}">
										<span title="<%for(listProduct in list.productItemList!){%><%if(listProductLP.index != 0){%>、<%}%>${listProduct.name}<%}%>">
											<%for(listItem in list.orderItemList!){%>
												<%if(listItemLP.index != 0){%>、<%}%>
													${listItem.productName}
												<%if(listItemLP.index == 3 && listItemLP.last){%>
													...<%break;%>
												<%}%>
											<%}%>
										</span>
									</a>
								</td>
								<td>
									<a href="${base}/order/view?id=${list.id}">${list.orderSn!}</a>
								</td>
								<td>
									<span title="${list.createDate,dateFormat="yyyy-MM-dd HH:mm:ss"}">${list.createDate,dateFormat="yyyy-MM-dd HH:mm:ss"}</span>
								</td>
								<td>
									${list.totalAmount!,orderUnitCurrencyFormat}
								</td>
								<td>
									<%if (list.orderStatusValue != "processed" && list.orderStatusValue != "unprocessed"){%>
										<p>[${i18n("OrderStatus." + list.orderStatusValue)}]</p>
									<%}%>
									<p>[${i18n("PaymentStatus." + list.paymentStatusValue)}]</p>
									<p>[${i18n("ShippingStatus." + list.shippingStatusValue)}]</p>
								</td>
							</tr>
							<%if (listLP.index > 4){%>
								<%break;%>
							<%}%>
						<%}%>
						<tr>
							<td colspan="5">
								<a href="${base}/shop/order/list">更多订单>></a>
							</td>
						</tr>
					</table>
					<div class="blank"></div>
				</div>
				<div class="bottom"></div>
			</div>
		</div>
		<div class="blank"></div>
		<%include("/WEB-INF/views/shop/friend_link.html"){}%>
	</div>
	<div class="blank"></div>
	<%include("/WEB-INF/views/shop/footer.html"){}%>
</body>
</html>